import java.util.Scanner;

public class Code1 {

    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);
        System.out.println("请输入年份：");
        int y = sc.nextInt();
        System.out.println("请输入月份：");
        int m = sc.nextInt();
        System.out.println("请输入日期：");
        int d = sc.nextInt();

        int[] arr = {0,31,28,31,30,31,30,31,31,30,31,30,31};

        if(0==y%4 && 0!=y%100 || 0==y%400){
            arr[2] = 29;
        }

        int res = 0;
        for(int i=1; i<m; i++){
            res += arr[i];
        }

        res = res+d;
        System.out.println(y+"年"+m+"月"+d+"日是这一年中的第"+res+"天");
    }
}
